﻿
using System.Windows.Controls;
namespace NavFx
{
	/// <summary>
	/// Ensures a page has a reference to the Navigator
	/// </summary>
	/// <remarks>
	/// Implement this interface when you create a Page
	/// that hosts other pages, for example a page acting
	/// as the shell for an application might provide the
	/// navigation features of the application.
	/// 
	/// This interface provides a reference to the Navigator
	/// for convenience avoiding the need to always
	/// refer to a Application.Current for navigation
	/// </remarks>
	public interface IHostPage: IPage
	{
		/// <summary>
		/// Enables the content of the hosting component to set it's content which is protected
		/// and therefore normally only can be changed by derived classes
		/// </summary>
		/// <param name="newContent">New content to be displayed</param>
		void SetContent(UserControl newContent);

		/// <summary>
		/// Reference to the Navigator used for navigating between hosted pages
		/// </summary>
		Navigator Navigator
		{
			get;
			set;
		}
	}
}
